package com.gjintel.workflow.trade.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.gjintel.framework.role.model.Role;
import com.gjintel.sdk.base.dao.HibernateGenericDAO;
import com.gjintel.sdk.base.dao.Page;
import com.gjintel.sdk.base.dao.Sort;
import com.gjintel.workflow.trade.dao.IDicTaskDao;
import com.gjintel.workflow.trade.model.DicTask;

/**
 * @description activiti 任务字典dao实现类 
 * @author wwang 
 * @date 2016-8-25
 */
@Repository("dicTaskDao")
@SuppressWarnings("unchecked")
public class DicTaskDaoImpl extends HibernateGenericDAO implements IDicTaskDao {

	@Override
	public List<DicTask> findAll(Page page, Role role, Sort sort) {
		return null;
	}

	@Override
	public List<DicTask> getDicTaskByTaskNameAndRoleId(String taskName,
			String roleId) {
		return this.find("select d from DicTask d,RoleTask r where d.id=r.taskId and d.taskName=? and r.roleId=?",taskName,roleId);
	}
	
}
